#pragma once
#include "ataskinterface.h"
#include <string>
using std::string;
#include "gdal_priv.h"
#include <qobject.h>

class TheTask :public QObject, public ARSSTaskInterface
{
	Q_OBJECT
public:
	TheTask(string b1file,int b1b1,
		string b3file,int b3b1,
		string outfile, double coefA,double coefB,double scale,double coefC);
	virtual void run() ;
private:
	string _b1file;
	int    _b1b1;
	string _b3file;
	int    _b3b1;
	string _outfile;
	double _coefA;
	double _coefB;
	double _coefC;
	double _scale;
	void doOne(GDALDataset* inds1, GDALDataset* inds3, GDALDataset* outds, int b1b1, int b3b1,
		const int xsize, const int ysize,
		double cA, double cB,double scale,double cC);

signals:
	void onSaveTaskDone();
};

